<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
<!-- above set at the top of the file will set     -->
<!-- the browser's rendering engine into           -->
<!-- "Quirks Mode". Replacing this declaration     -->
<!-- with a "Standards Mode" doctype is supported, -->
<!-- but may lead to some differences in layout.   -->

<!-- Google Maps API key=ABQIAAAA99UDI_jmP6LHMlZF0upUSRSAakixCvnWGwknJ0VA7YpyR3avbBT8U3yhHVi5-rdTiD4SNMjDdGJesA -->
<!-- trunk -->
<!-- test -->
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta name="google-site-verification" content="QbFbTs_7td2H0SRoOF76w2H2LrxZqe4jvFYoqMozbq0" />
    <title>Google Maps in App Engines</title>
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAA99UDI_jmP6LHMlZF0upUSRSAakixCvnWGwknJ0VA7YpyR3avbBT8U3yhHVi5-rdTiD4SNMjDdGJesA" type="text/javascript"></script>
    <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(56.355741, 43.843346), 13);
        map.setUIToDefault();
        
        var bus_stops = {
        "CSormova": new GLatLng(56.34968, 43.868312),
        "Ispolkoma": new GLatLng(56.356484, 43.865377),
        "perSouznuy": new GLatLng(56.361089,43.862102),
        "Nogina": new GLatLng(56.359618,43.848584),
        "Gaugelya": new GLatLng(56.361616,43.808997)
        };
		var markers = new Array();
        for (var bStop in bus_stops)
        {
        	markers[bStop] = new GMarker(bus_stops[bStop]);
        	map.addOverlay(markers[bStop]);
        }
        
        var rect = new GPolyline( Array(bus_stops["CSormova"], bus_stops["Ispolkoma"], bus_stops["perSouznuy"], bus_stops["Nogina"]) );
		map.addOverlay(rect);
		function moveMarker()
		{
			lat = markers["Gaugelya"].getLatLng().lat(); 
			lng = markers["Gaugelya"].getLatLng().lng() + 0.001145;
			markers["Gaugelya"].setLatLng(new GLatLng(lat, lng));
		}
		
		setInterval(moveMarker, 1000)
		//alert(markers["Gaugelya"].getLatLng().lng()+0.000005);
      }
    }
    
    </script>
  </head>

  <body onload="initialize()" onunload="GUnload()">
    <h1>Интеллектуальная транспортная система. Beta</h1>
	
	<div id="map_canvas" style="width: 500px; height: 300px"></div>
    <table>
      <tr>
        <td colspan="2" style="font-weight:bold;">Available Servlets:</td>        
      </tr>
      <tr>
        <td><a href="myapp"/>Myapp</td>
      </tr>
      <tr>
        <td><a href="second"/>Second</td>
      </tr>
    </table>
  </body>
</html>
